package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Sign;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SignMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Sign record);

    Sign selectByPrimaryKey(Integer id);

    List<Sign> selectAll();

    int updateByPrimaryKey(Sign record);

    List selectSigns(QueryObject qo);

    Integer selectDays(QueryObject qo);

    void updateByUserId(Sign s);

    Integer selectPointByUserId(Sign s);

    String selectMaxDate(Sign entity);

    Integer selectState(Sign entity);

    //查询用户积分
    Integer selectUserPoint(Long userId);


    void updatePoint(@Param("userId") Long userId, @Param("point") Integer point,@Param("date") String date);

    String selectMaxDateByUserId(Long userId);
}